#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<assert.h>
char* my_strncpy(char* dest, const char* src, size_t n)
{
	assert(dest && src);
	char* ret = dest;
	while(n--)
	{
	    *(dest++) = *(src++);
	}
	return ret;
}
int main()
{
	char arr1[] = "ILove Bit";
	char arr2[] = "Hello";
	printf("%s\n",my_strncpy(arr1, arr2, 5));
	return 0;
}

